GUI Help > Special > setPanelImage

setPanelImage
setPanelImage handle gadget, [str filename] | [int image]

Description:
Loads an image into a panel gadget. This can either be an image loaded into DBPro using LOAD IMAGE, or a bitmap file.

Return Value:


Parameters:
gadget Handle to a panel or label gadget.
image If specified, the Id of an image loaded into DBPro using LOAD IMAGE or GET IMAGE. Note that images created using SET CAMERA TO IMAGE do not work (bug in DBPro).

Important: When loading the image into DBPro, you should enable the texture flag. Eg: LOAD IMAGE "file.bmp",imageNum,1 or GET IMAGE imageNum,0,0,128,128,1.

You must also ensure that you have a memblock command somewhere else in your program. This does not need to be in any code which is ever run, but it just needs to be there in your source so that the compiler builds the memblock commands into the program.
fileName Alternatively, you can specify the filename of a bitmap (BMP) file and that will be loaded instead. The pixel in the top-left hand corner of the image will be used as a transparent colour.
Remarks:


See Also:


Example:
(Note: You will need to include the GUI constants file for this example to work)